package com.note.simpleshop.module.order.vo;

import com.note.simpleshop.entity.TbOrderItem;

import java.math.BigDecimal;

/***
 *@ClaseName:OrderItem
 *
 *@Decription:
 *
 *@Author: xubingbing
 *
 *@Date:2019/1/18 0018 22:51
 */
public class OrderItemVo {
    private String id;
    private Integer num;
    private String detail;
    private String goodsName;
    private String orderId;
    private BigDecimal markertPrice;
    private BigDecimal salePrice;
    private Double discount;
    private String remark;
    private String goodsSpecId;
    private String goodsId;
    private String thumbnail;

    public String getGoodsSpecId() {
        return goodsSpecId;
    }

    public void setGoodsSpecId(String goodsSpecId) {
        this.goodsSpecId = goodsSpecId;
    }

    public String getGoodsId() {
        return goodsId;
    }

    public void setGoodsId(String goodsId) {
        this.goodsId = goodsId;
    }

    public String getThumbnail() {
        return thumbnail;
    }

    public void setThumbnail(String thumbnail) {
        this.thumbnail = thumbnail;
    }

    public BigDecimal getMarkertPrice() {
        return markertPrice;
    }

    public void setMarkertPrice(BigDecimal markertPrice) {
        this.markertPrice = markertPrice;
    }

    public BigDecimal getSalePrice() {
        return salePrice;
    }

    public void setSalePrice(BigDecimal salePrice) {
        this.salePrice = salePrice;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public Integer getNum() {
        return num;
    }

    public void setNum(Integer num) {
        this.num = num;
    }

    public String getDetail() {
        return detail;
    }

    public void setDetail(String detail) {
        this.detail = detail;
    }

    public String getGoodsName() {
        return goodsName;
    }

    public void setGoodsName(String goodsName) {
        this.goodsName = goodsName;
    }

    public String getOrderId() {
        return orderId;
    }

    public void setOrderId(String orderId) {
        this.orderId = orderId;
    }

    public Double getDiscount() {
        return discount;
    }

    public void setDiscount(Double discount) {
        this.discount = discount;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public static OrderItemVo newInstance(TbOrderItem order) {
        OrderItemVo orderItemVo=new OrderItemVo();
        orderItemVo.id=order.getId();
        orderItemVo.num=order.getNum();
        orderItemVo.detail=order.getDetail();
        orderItemVo.goodsName=order.getGoodsName();
        orderItemVo.orderId=order.getOrderId();
        orderItemVo.salePrice=order.getSalePrice();
        orderItemVo.markertPrice=order.getMarketPrice();
        orderItemVo.discount=order.getDiscount();
        orderItemVo.remark=order.getRemark();
        orderItemVo.thumbnail=order.getThumbnail();
        orderItemVo.goodsId=order.getGoodsId();
        orderItemVo.goodsSpecId=order.getGoodsSpecId();
        return  orderItemVo;
    }

}
